package com.lei.yohuo001java.adapter;

import android.widget.ImageView;

import androidx.annotation.Nullable;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.lei.mvp_retrofitlibrary.http.bean.GoodsBean;
import com.lei.yohuo001java.R;

import java.util.List;

/**
 * @ProjectName : YoHuo001Java
 * @Author : 雷金泷
 * @Time : 2020/12/17 10:08
 * @Description : 文件描述
 */
public class MyGoodsAdapter2 extends BaseQuickAdapter<GoodsBean.DataBean, BaseViewHolder> {
    public MyGoodsAdapter2(int layoutResId, @Nullable List<GoodsBean.DataBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, GoodsBean.DataBean item) {
        Glide.with(mContext).load(item.getPictUrl()).into((ImageView) helper.getView(R.id.iv1_item2));
        helper.setText(R.id.tv1_item2,item.getCategoryName()+"");
    }
}
